import Vue from "vue";
import VueRouter from "vue-router";
import layout from '@/views/03/Layout.vue'
import articledetail from '../views/03/ArticleDetail.vue'
import article from '../views/03/Article.vue'
import like from '@/views/03/Like.vue'
import user from "../views/03/User.vue"
import collect from '../views/03/Collect.vue'
Vue.use(VueRouter);

const router = new VueRouter({
  linkExactActiveClass: 'active',
  
  routes: [
    {
      path: '/', component: layout,redirect:'/article',
      children: [
        { path: '/article', component: article },
        { path: '/like', component: like },
        { path: '/user', component: user },
        { path: '/collect', component: collect },

      ]
    },
    { path: '/detail/:id?', component: articledetail }
  ]
})
export default router